package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    //根据菜品id查询套餐id
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);
//    批量插入菜品
    void insertBatch(List<SetmealDish> setmealDishes);
    //删除套餐关联的菜品
    @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
    void deleteBySetmealId(Long id);
    //根据套餐id查询包含的菜品
    List<SetmealDish> getBySetmealId(Long id);
}
